package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.InstitutionExample.E_COMPANY_ID;
import static org.jsola.hr.example.InstitutionExample.E_INSTITUTION_CONTENT;
import static org.jsola.hr.example.InstitutionExample.E_INSTITUTION_TITLE;
import static org.jsola.hr.example.InstitutionExample.E_INSTITUTION_TYPE_ID;
import static org.jsola.hr.example.InstitutionExample.E_INSTITUTION_URL;
import static org.jsola.hr.example.InstitutionExample.E_IS_OPEN;
import static org.jsola.hr.example.InstitutionExample.E_PLAIN_TEXT;
import static org.jsola.hr.example.InstitutionExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.InstitutionExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.InstitutionExample.M_INSTITUTION_CONTENT_MAX;
import static org.jsola.hr.example.InstitutionExample.M_INSTITUTION_TITLE_MAX;
import static org.jsola.hr.example.InstitutionExample.M_INSTITUTION_TYPE_ID_MAX;
import static org.jsola.hr.example.InstitutionExample.M_INSTITUTION_URL_MAX;
import static org.jsola.hr.example.InstitutionExample.M_PLAIN_TEXT_MAX;
import static org.jsola.hr.example.InstitutionExample.N_COMPANY_ID;
import static org.jsola.hr.example.InstitutionExample.N_INSTITUTION_CONTENT;
import static org.jsola.hr.example.InstitutionExample.N_INSTITUTION_TITLE;
import static org.jsola.hr.example.InstitutionExample.N_INSTITUTION_TYPE_ID;
import static org.jsola.hr.example.InstitutionExample.N_INSTITUTION_URL;
import static org.jsola.hr.example.InstitutionExample.N_IS_OPEN;
import static org.jsola.hr.example.InstitutionExample.N_PLAIN_TEXT;

/**
 * 制度
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【制度】的参数")
@Data
public class InstitutionUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_INSTITUTION_TYPE_ID, example = E_INSTITUTION_TYPE_ID)
    @Length(max = 32, message = M_INSTITUTION_TYPE_ID_MAX)
    private String institutionTypeId;

    @ApiModelProperty(notes = N_INSTITUTION_TITLE, example = E_INSTITUTION_TITLE)
    @Length(max = 32, message = M_INSTITUTION_TITLE_MAX)
    private String institutionTitle;

    @ApiModelProperty(notes = N_INSTITUTION_URL, example = E_INSTITUTION_URL)
    @Length(max = 2147483647, message = M_INSTITUTION_URL_MAX)
    private String institutionUrl;

    @ApiModelProperty(notes = N_IS_OPEN, example = E_IS_OPEN)
    private Boolean isOpen;

    @ApiModelProperty(notes = N_INSTITUTION_CONTENT, example = E_INSTITUTION_CONTENT)
    @Length(max = 2147483647, message = M_INSTITUTION_CONTENT_MAX)
    private String institutionContent;

    @ApiModelProperty(notes = N_PLAIN_TEXT, example = E_PLAIN_TEXT)
    @Length(max = 2147483647, message = M_PLAIN_TEXT_MAX)
    private String plainText;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

